<?php

namespace app\common\model\order;

use app\common\model\BaseModel;

class Charges extends BaseModel
{
    protected $name = 'charges';
    protected $pk = 'id';
    protected $autoWriteTimestamp = 'int';
    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';
    protected $deleteTime = 'delete_time';

    protected $json = ['prices'];
    protected $type = [
        'create_time' => 'timestamp',
        'update_time' => 'timestamp',
        'delete_time' => 'timestamp',
    ];
    
    /**
     * 字段验证规则
     * @var array
     */
    protected $schema = [
        'id'            => 'int',
        'name'          => 'string',
        'type'          => 'string',
        'prices'        => 'json',
        'status'        => 'int',
        'create_time'   => 'timestamp',
        'update_time'   => 'timestamp',
        'delete_time'   => 'timestamp',
    ];
}